package com.yizhang.pattern.chain;

/**
 * @Author: yi.zhang
 * @CreateTime: 2025-08-22 15:42:53
 * @Description:
 */
public class CheckMemberHandler extends Handler<Member> {
    @Override
    public void handle(Member member) {
        System.out.println("开始检查用户名和密码");
        // 检查用户名和密码
        if (member.getLoginName() == null || member.getPassword() == null) {
            System.out.println("用户名和密码不能为空");
            return;
        }
        if (null != this.next) {
            this.next.handle(member);
        }
    }
}
